<template>
	<div class="warp">
		<div class="title">
			<i class="iconfont"></i>
			{{ $t("message.environmentSetting.list.title_9") }}
		</div>
		<div class="tabs-view">
			<el-button v-for="(i, index) in tabs" :key="i.name" :type="tabPosition == index ? 'primary' : ''"
				@click="tabPosition = index">
				{{ i.name }}
			</el-button>
		</div>

		<Tab1 v-if="tabPosition == 0"></Tab1>
		<Tab2 v-if="tabPosition == 1"></Tab2>
		<Tab3 v-if="tabPosition == 2"></Tab3>

	</div>
</template>

<script>
import $ from "jquery";
import Tab1 from './tabs/tab1.vue'
import Tab2 from './tabs/tab2.vue'
import Tab3 from './tabs/tab3.vue'
export default {
	name: "Unit",
	data() {
		return {
			tabPosition: 0,
			tabs: [
				{ name: '詳細仕様' },
				{ name: '流体' },
				{ name: '圧力/温度' },
			],
		};
	},
	components: { Tab1, Tab2, Tab3 },
	watch: {},
	methods: {

	},
	created() { },
	mounted() {
		let _this = this;
		this.tableHeight = $(".View").height() - 241;
		this.$nextTick(function () {
			window.addEventListener(
				"resize",
				() => {
					return (() => {
						_this.tableHeight = $(".View").height() - 241;
					})();
				},
				false
			);
		});
	},
	beforeDestroy() { },
	destroyed() { },
};
</script>
<style lang="scss" scoped>
.warp {
	height: 100%;
	width: 100%;
	padding-left: 32px;
	position: relative;

	.title {
		width: 100%;
		height: 32px;
		border-bottom: 1px solid #d8d8d8;
		display: flex;
		align-items: center;

		.iconfont {
			margin-right: 10px;
		}

	}

	.tabs-view {
		width: 100%;
		padding: 16px 0;

		button {
			width: 200px !important;
			border-radius: 0;
			margin: 0;
		}
	}

	.tab-title {
		width: 200px;
		height: 32px;
		background: #ffffff;
		border: 1px solid #dee0e3;
		text-align: center;
		line-height: 32px;
		font-size: 14px;
		color: #1f2329;
		border-right: 0 none;
		transition: 0.5s;
	}

	.active-style {
		background: #106ebe;
		color: #ffffff;
	}

	.tab-title:nth-child(1) {
		border-radius: 4px 0 0 4px;
	}

	.tab-title:nth-child(3) {
		border-right: 1px solid #dee0e3;
		border-radius: 0 4px 4px 0;
	}

	.btn-wrapper {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 20px;

		.bgFFF {
			::v-deep .el-input__inner {
				width: 240px;
				height: 32px;
				background: #FFF;
			}

			::v-deep .el-select__caret {
				line-height: 32px;
			}

		}


		button {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 68px;
			height: 32px;
			border: 1px solid #d9d9d9;
			margin-left: 16px;
		}

		button:nth-child(1) {
			width: 32px;
			font-size: 18px;
		}

		button:nth-child(2) {
			width: 32px;
			font-size: 18px;
		}

		.active-button {
			background: #106ebe;
			color: #ffffff;
		}
	}

	.table-input {
		::v-deep .el-input__inner {
			background: none;
			border: 0 none;
			padding: 0;
		}
	}

	.SELE {
		width: 100%;
		height: 32px;

		::v-deep .el-input__inner {
			background: none;
			border: 0 none;
			padding: 0;
			width: 100%;
			height: 32px;

			padding-left: 10px;
		}

		::v-deep .el-input__inner:focus {
			border: 1px solid #dcdfe6;
		}

		::v-deep .el-input__icon {
			line-height: 32px;
			color: #909399;
		}

		::v-deep .el-input__suffix {
			width: 32px;
			right: 0;
			background: #dee0e3;
		}
	}
}





.footer-wrapper {
	width: 100%;
	// position: absolute;
	// left: 0px;
	// bottom: 0px;
	// height: 47px;
	margin-top: 10px;
	display: flex;
	align-items: center;
	background: rgb(248, 248, 248);

	button {
		padding: 0 12px;
		min-width: 82px;
		height: 32px;
		background: #ffffff;
		border: 1px solid #d9d9d9;
		text-align: center;
		line-height: 32px;
		margin-right: 16px;
	}

	.okBTn {
		background: #106ebe;
		color: #fff;
	}
}
</style>
